package team.mai.antexpress.spring.beans;

import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

@Component
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
public class LoginBean {

	private boolean validLogin;
	private String username;
	private String password;
	private String captchaInput;
	private String correctCaptcha;

	public void clear() {
		username = null;
		password = null;
		correctCaptcha = null;
		captchaInput = null;
		validLogin = false;
	}

	public String getCaptchaInput() {
		return captchaInput;
	}

	public void setCaptchaInput(String captchaInput) {
		this.captchaInput = captchaInput;
	}

	public boolean isValidLogin() {
		return validLogin;
	}

	public void setValidLogin(boolean validLogin) {
		this.validLogin = validLogin;
	}

	public String getCorrectCaptcha() {
		return correctCaptcha;
	}

	public void setCorrectCaptcha(String correctCaptcha) {
		this.correctCaptcha = correctCaptcha;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
}
